Skip to content

feat(compression): integrate automatic FlatBuffer alignment #3177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rkuester
Copy link
Contributor

@rkuester rkuester commented Aug 8, 2025

Enhance compress() function to automatically apply proper
FlatBuffer alignment after compression, eliminating the need for
users to manually run tflite_flatbuffer_align as a separate step.
Use the C++ alignment wrapper internally, as the Python
flatbuffers library doesn't respect force_align schema
attributes.

Keep the API unchanged - compress() still returns a bytearray,
but now the output is properly aligned for the TFLM interpreter.
Update documentation, and build dependencies of the Python
package.

BUG=#3125

Enhance compress() function to automatically apply proper
FlatBuffer alignment after compression, eliminating the need for
users to manually run tflite_flatbuffer_align as a separate step.
Use the C++ alignment wrapper internally, as the Python
flatbuffers library doesn't respect force_align schema
attributes.

Keep the API unchanged - compress() still returns a bytearray,
but now the output is properly aligned for the TFLM interpreter.
Update documentation, and build dependencies of the Python
package.

BUG=tensorflow#3125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants